<template>
    <div id="tilte-bar">
        <img src="../assets/toleft.png" alt="上一页" @click="goBack">
        {{titleValue}}
    </div>
</template>

<script>
    export default {
        props: ['titleValue'],
        methods: {
            goBack: function() {
                history.go(-1);
            }
        }
    }
</script>

<style scoped>
    #tilte-bar {
      background-color: #3c3838;
      color: white;
      font-size: 1rem;
      padding-left: 1rem;
      line-height: 2.5rem;
      position: fixed;
      top: 0;
      width: 100vw;
    }
    img {
        width: 1.5rem;
        vertical-align: middle;
    }
</style>